/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package lpsclient.business;

import interfaces.ServerInterface;
import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author LOGON
 */
public class DemoBusiness {
    private final String naming = "demo";
    private String registerURL;
    private ServerInterface demo;

    public DemoBusiness() {
        try {
            RegisterHost reg = RegisterHost.getInstance();
            this.registerURL = reg.getURL() + this.naming;
            demo = (ServerInterface) Naming.lookup(this.registerURL);
        } catch (NotBoundException ex) {
            Logger.getLogger(DemoBusiness.class.getName()).log(Level.SEVERE, null, ex);
        } catch (MalformedURLException ex) {
            Logger.getLogger(DemoBusiness.class.getName()).log(Level.SEVERE, null, ex);
        } catch (RemoteException ex) {
            Logger.getLogger(DemoBusiness.class.getName()).log(Level.SEVERE, null, ex);
        }
    }


}
